package com.px.mapper;

import com.px.pojo.ShCommodity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ShCommodityMapper {

    //获取商品列表
    List<ShCommodity> selectShCommodityList(@Param("commodityName") String commodityName,
                                            @Param("dicOneId") Integer dicOneId,
                                            @Param("dicTwoId") Integer dicTwoId,
                                            Double minPrice,Double maxPrice,
                                            @Param("ram") String ram,
                                            @Param("pageBegin") Integer pageBegin, @Param("pageSize") Integer pageSize)throws Exception;

    //获取商品记录数
    int selectShCommodityCount(@Param("commodityName") String commodityName,
                               @Param("dicOneId") Integer dicOneId,
                               @Param("dicTwoId") Integer dicTwoId,
                               Double minPrice,Double maxPrice,
                               @Param("ram") String ram)throws Exception;

    //获取商品信息
    ShCommodity selectShCommodity(@Param("commodityId") Integer commodityId)throws Exception;

    //添加商品信息
    int insertShCommodity(ShCommodity shCommodity)throws Exception;

    //更新商品信息
    int updateShCommodity(ShCommodity shCommodity)throws Exception;

    //删除商品信息
    int deleteShCommodity(@Param("commodityId")Integer id)throws Exception;


}
